{{define "navbar"}}
<nav class="navbar navbar-expand-lg navbar-light bg-light container-fluid mb-3">
    <div class="container">
	<a class="navbar-brand" href="/">O Box</a>
	<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
	    <span class="navbar-toggler-icon"></span>
	</button>
	<div class="collapse navbar-collapse" id="navbarSupportedContent">
	    <ul class="navbar-nav me-auto mb-2 mb-lg-0">
		<li class="nav-item">
		    <a class="nav-link" aria-current="page" href="/list/">List</a>
		</li>
		<li class="nav-item">
		    <!-- <a class="nav-link" href="#">New</a> -->
		    <!-- Button trigger modal -->
		    <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
			New
		    </button>

		</li>
	    </ul>
	    <!-- <form class="d-flex" action="/search" method="GET"> -->
	    <!--     <input class="form-control me-2" type="search" name="search" placeholder="Search" aria-label="Search"> -->
	    <!--     <button class="btn btn-outline-success" type="submit">Search</button> -->
	    <!-- </form> -->
	</div>
    </div>
</nav>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
	<div class="modal-content">
	    <form action="/new/" method="get" accept-charset="utf-8">
		<div class="modal-header">
		    <h5 class="modal-title" id="exampleModalLabel">New Object</h5>
		    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
		</div>
		<div class="modal-body">
		    <div class="mb-3">
			<label for="exampleFormControlInput1" class="form-label">Object Name</label>
			<input type="input" class="form-control" name="name" placeholder="Input the new's name">
		    </div>
		</div>
		<div class="modal-footer">
		    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
		    <button type="submit" class="btn btn-primary">New</button>
		</div>
	    </form>
	</div>
    </div>
</div>
{{end}}
